package com.cxd.base.service;

import java.util.Map;

import javax.annotation.Resource;

import com.cxd.base.common.exception.CxdException;
import com.cxd.base.util.BeanTools;

/**
 * @author wtj
 * @date 2015年12月1日 下午4:16:20
 * @company CXD
 * @version [Copyright (c) 2015 V001]
 */
public abstract class BaseService {
	@Resource
	public BeanTools db;
	
	public int add(Object entity) throws CxdException{
		return db.add(entity);
	};
	public abstract int add(Object entity,Map<String, Object> m) throws CxdException;
	
	public int update(Object entity) throws CxdException{
		return db.modify(entity);
	};
	public abstract int update(Object entity,Map<String, Object> m) throws CxdException;
	
	public int del(Object entity) throws CxdException{
		return db.modify(entity);
	};
	public abstract int del(Object entity,Map<String, Object> m) throws CxdException;
	
	// List<Map<String, Object>>  queryListPage(Map<String, Object> root);
}
